package testcase

import (
	"encoding/json"
	httpexpect "github.com/gavv/httpexpect/v2"
	. "saas_sys_base/common"
	. "saas_sys_base/modules/tenant/controller"
	"saas_sys_base/testcase/test_helper"
)



type CreateTenantWithMemberResponse struct {
	ErrMsg
	Data *CreateTenantWithMemberResp `json:"data,omitempty"`


}

func PostCreateTenantWithMember(t httpexpect.LoggerReporter, headers map[string]string) (resp *httpexpect.Response, respObj *CreateTenantWithMemberResponse) {
	urlParam := struct{}{}
	req := struct{}{}
	response := new(CreateTenantWithMemberResponse)

	resp = test_helper.PostTestUrl(t, "/api/sys/tenant/create_tenant_with_member", urlParam, req, headers)

	respbody := resp.Body().Raw()

	if err := json.Unmarshal([]byte(respbody), response); err != nil {
		return resp, nil
	}
	return resp, response
}